<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:rich="http://richfaces.org/rich"
	template="../template.xhtml">
	
   

	<ui:define name="body">
	
		<h:form id="postAddChangeForm">
			<h:inputHidden id="id" value="#{postAddChange.post.id}" />
			<h:panelGrid columns="2">
				<h:outputLabel for="title"><h:outputText value="Başlık" /></h:outputLabel>
			    <h:inputText  id="title" value="#{postAddChange.post.title}" />
			    
			    <h:outputLabel for="slug"><h:outputText value="Slug" /></h:outputLabel>
			    <h:inputText  id="slug" value="#{postAddChange.post.slug}" />
			    
			    <h:outputLabel for="content"><h:outputText value="İçerik" /></h:outputLabel>
			    <h:inputTextarea  id="content" value="#{postAddChange.post.content}"/>
			    
			    <h:outputLabel for="status"><h:outputText value="Durum" /></h:outputLabel>
			    <h:selectOneMenu id="status" value="#{postAddChange.post.status}">
					<f:selectItem itemLabel="PUBLISH" itemValue="PUBLISH" />
					<f:selectItem itemLabel="NOTPUBLISH" itemValue="NOTPUBLISH" />
				</h:selectOneMenu>
				
				<h:outputLabel for="commentStatus"><h:outputText value="Yorumlar" /></h:outputLabel>
			    <h:selectOneMenu id="commentStatus" value="#{postAddChange.post.commentStatus}">
					<f:selectItem itemLabel="OPEN" itemValue="OPEN" />
					<f:selectItem itemLabel="CLOSED" itemValue="CLOSED" />
				</h:selectOneMenu>
			    
			    <h:outputText value="" />
			    <h:panelGroup align="right">
				    <h:commandButton value="İptal" action="cancel" class="buttonBg"/>
				    <h:commandButton value="Kaydet" action="#{postAddChange.saveOrUpdate}" class="buttonBg"/>
			    </h:panelGroup>
			</h:panelGrid>			
		</h:form>

	</ui:define>

</ui:composition>